//
//  CHExceptionCell.m
//  CarFile
//
//  Created by 陈浩 on 2017/7/18.
//  Copyright © 2017年 陈浩. All rights reserved.
//

#import "CHExceptionCell.h"
@interface CHExceptionCell ()
{
    UILabel *titleLabel;
    UILabel *numLabel;
}

@end
@implementation CHExceptionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


+(instancetype)cellForTableView:(UITableView *)tableView{
    static NSString *ID = @"CHExceptionCell";
    CHExceptionCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell =[[CHExceptionCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    return cell;
    
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        //        self.backgroundColor = KRGB(239, 239, 249);
        [self buildUI];
    }
    return self;
}

-(void)buildUI{
    
    titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, UIScreenW/3, self.h)];
    titleLabel.font = [UIFont systemFontOfSize:14];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.textColor = [UIColor colorWithHexString:@"999999" alpha:1.0f];
    [self.contentView addSubview:titleLabel];
    
    numLabel = [[UILabel alloc] initWithFrame:CGRectMake(UIScreenW /3, 0, UIScreenW /3 *2, self.h)];
    numLabel.font = [UIFont systemFontOfSize:14];
    numLabel.textAlignment = NSTextAlignmentCenter;
    numLabel.textColor = [UIColor colorWithHexString:@"1692c8" alpha:1.0f];
    [self.contentView addSubview:numLabel];
    
    
}

-(void)setModel:(CHExceptionModel *)model{
    _model = model;
    titleLabel.text = model.areacn;
    numLabel.text = model.exceptionnum;
    
}

@end
